package com.donquijote.spring12.bean3;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author 421527548@qq.com
 * @version V1.0
 * @title
 * @description
 * @date 2022-11-23 19:06
 */
@Component
public class MyDataSource {

    @Value(value = "com.spring.org.Driver")
    private String driver;
    @Value("http://localhost 8080 mysql/test")
    private String url;
    @Value("root")
    private String username;
    @Value("123456")
    private String password;

/*    public void setDriver(String driver) {
        this.driver = driver;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setPassword(String password) {
        this.password = password;
    }*/

    @Override
    public String toString() {
        return "MyDataSource{" +
                "driver='" + driver + '\'' +
                ", url='" + url + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
